//
//  WorkerCollectionViewCell.m
//  Btpin
//
//  Created by Vic on 2019/12/17.
//  Copyright © 2019 Vic. All rights reserved.
//


#import "WorkerCollectionViewCell.h"

#define WorkerCellLblTag (200)

@interface WorkerCollectionViewCell ()
{
    //    WorkerBaseView *baseView;
    //    UIView *lineView;
    
    UIImageView *headerImgView;
    UILabel *nameLbl;
    UILabel *baseInfoLbl;
    UILabel *workInfoLbl;
    UILabel *intentionLbl;
    UILabel *timeLbl;
    
    UIImageView *tagImgView;
}
@end

@implementation WorkerCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
    self.backgroundColor = COLOR_OF_CLEAR;
    self.contentView.backgroundColor = COLOR_OF_CLEAR;
    
//    baseView = [[WorkerBaseView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 95*Scale)];
//    [self.contentView addSubview:baseView];
    
    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), self.frame.size.height) backgroundColor:COLOR_OF_WHITE];
    [self.contentView addSubview:self.bgView];
    [self.bgView corners:(UIRectCornerTopLeft | UIRectCornerTopRight) radii:CGSizeMake(ScalePS(8), ScalePS(8))];
    
    CALayer *subLayer = [UIView setCornerAndshadowForViewFrame:self.bgView.frame cornerRadius:ScalePS(8) backgroundColor:COLOR_OF_WHITE shadowColor:THEMECOLOR_OF_TEXT_cccccc shadowOffset:CGSizeMake(0, -1) shadowOpacity:0.7 shadowRadius:ScalePS(3)];
    [self.contentView.layer insertSublayer:subLayer below:self.bgView.layer];
    
    headerImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(ScalePS(10), 10*Scale, 44*Scale, 44*Scale) imageName:@"header_bg"];
    headerImgView.contentMode = UIViewContentModeScaleAspectFill;
    headerImgView.layer.cornerRadius = 22*Scale;
    headerImgView.layer.masksToBounds = YES;
    [self.bgView addSubview:headerImgView];
    headerImgView.backgroundColor = THEMECOLOR_OF_TEXT_cccccc;
    
    tagImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(EndX(headerImgView)-15*Scale, EndY(headerImgView)-10*Scale, 10*Scale, 10*Scale) imageName:@"worker_tag"];
    [self.bgView addSubview:tagImgView];
    
    nameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, 10*Scale, 100, 25*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    nameLbl.font = FontBold(Font_18);
    [self.bgView addSubview:nameLbl];
    
    baseInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(nameLbl), 15*Scale, 200, 15*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_12];
    [self.bgView addSubview:baseInfoLbl];
    
    workInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(nameLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [self.bgView addSubview:workInfoLbl];
    
    intentionLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(workInfoLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [self.bgView addSubview:intentionLbl];
    
    timeLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, 0, WIDTH-15*Scale, 55*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_12];
    timeLbl.backgroundColor = COLOR_OF_CLEAR;
    timeLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:timeLbl];
    timeLbl.hidden = YES;
    
    
    CGFloat width = (WIDTH - ScalePS(50))*0.25;
    for (NSInteger i = 0; i < 4; i++) {
        UIButton *cerBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        cerBtn.tag = 1000+i;
        cerBtn.frame = CGRectMake(ScalePS(5)+(width+ScalePS(5))*i, EndY(headerImgView)+ScalePS(35), width, ScalePS(20));
        [self.bgView addSubview:cerBtn];
        cerBtn.hidden = YES;
        cerBtn.titleLabel.font = Font(Font_10);
        [cerBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
        cerBtn.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.2];
        cerBtn.layer.cornerRadius = ScalePS(10);
        cerBtn.layer.masksToBounds = YES;
    }
}
- (void)reloadDataModel:(WorkerModel *)model indexPath:(nonnull NSIndexPath *)indexPath {
    self.bgView.frame = CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), self.frame.size.height);
                   
//    switch (indexPath.row%5) {
//        case 0: {
//            self.bgView.backgroundColor = RGB(255, 118, 108);
//        } break;
//        case 1: {
//            self.bgView.backgroundColor = RGB(187, 104, 252);
//        } break;
//        case 2: {
//            self.bgView.backgroundColor = RGB(255, 137, 67);
//        } break;
//        case 3: {
//            self.bgView.backgroundColor = RGB(2, 168, 252);
//        } break;
//        case 4: {
//            self.bgView.backgroundColor = RGB(254, 187, 57);
//        } break;
//        default:
//            break;
//    }
    
    
    if (model.avatar && model.avatar.length) {
        [headerImgView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:@"header_bg"]];
    } else {
        headerImgView.image = [UIImage imageNamed:@"header_bg"];
    }
    
    NSInteger avatarInt = [model.auth_medal integerValue];
    if (avatarInt) {
        tagImgView.hidden = NO;
    } else {
        tagImgView.hidden = YES;
    }
    
    CGFloat nameWidth = [UIToolsControl textWidth:model.name size:CGSizeMake(MAXFLOAT, 25*Scale) font:Font_18]+10*Scale;
    nameLbl.frame = CGRectMake(EndX(headerImgView)+10*Scale, 10*Scale, nameWidth, 25*Scale);
    nameLbl.text = model.name?model.name:@"";
    
    baseInfoLbl.frame = CGRectMake(EndX(nameLbl), 17*Scale, 200, 15*Scale);
    baseInfoLbl.text = [NSString stringWithFormat:@"%@  %@  %@  %@", model.sex_cn?model.sex_cn:@"", model.age?model.age:@"", model.education_cn?model.education_cn:@"", model.experience_cn?model.experience_cn:@""];
    
    workInfoLbl.text = [NSString stringWithFormat:@"期望薪资：%@",  model.wage_cn?model.wage_cn:@""];
    
    if (model.job_title && model.job_title.length) {
        NSString *ssstr = model.job_title;
        
        NSString *intention1 = [NSString stringWithFormat:@"应聘职位：%@", ssstr];
        NSString *intention2 = @"应聘职位：";
        NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention1.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention2.length)];
        intentionLbl.attributedText = intentionAtt;
    }else if (model.intention_jobs && model.intention_jobs.length) {
        NSString *ssstr = model.intention_jobs;
        
        NSString *intention1 = [NSString stringWithFormat:@"意向职位：%@", ssstr];
        NSString *intention2 = @"意向职位：";
        NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention1.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention2.length)];
        intentionLbl.attributedText = intentionAtt;
    } else {
        if (model.intention_jobsArray && model.intention_jobsArray.count) {
            NSString *ssstr = @"";
            for (NSString *tempStr in model.intention_jobsArray) {
                ssstr = [NSString stringWithFormat:@"%@ %@", tempStr,  ssstr];
            }
            
            NSString *intention1 = [NSString stringWithFormat:@"意向职位：%@", ssstr];
            NSString *intention2 = @"意向职位：";
            NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention1.length)];
            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, intention2.length)];
            intentionLbl.attributedText = intentionAtt;
        } else {
            intentionLbl.text = @"意向职位：";
        }
    }
    
    
    switch (model.type) {
        case WorkerCellTypeOfNoTime: {
            timeLbl.text = @"";
        } break;
        case WorkerCellTypeOfOnlyTime: {
            timeLbl.text = model.showTime;
        } break;
        case WorkerCellTypeOfCollect: {
            timeLbl.text = [NSString stringWithFormat:@"%@收藏", model.showTime];
        } break;
        case WorkerCellTypeOfLook: {
            timeLbl.text = [NSString stringWithFormat:@"%@", model.showTime];
        } break;
        default:
            break;
    }
    
    
    /*
    NSMutableArray *array = [NSMutableArray array];
    NSInteger realname = [model.auth_info[@"realname"] integerValue];
    if (realname == 1) {
        NSDictionary *dic = @{@"name":@"实名已认证", @"icon":@"renzehng-shiming"};
        [array addObject:dic];
    }
    NSInteger avatar = [model.auth_info[@"avatar"] integerValue];
    if (avatar == 1) {
        if ([model.sex isEqualToString:@"2"]) {
            NSDictionary *dic = @{@"name":@"头像已认证", @"icon":@"renzheng_touxiang_nv"};
            [array addObject:dic];
        } else {
            NSDictionary *dic = @{@"name":@"头像已认证", @"icon":@"renzheng-touxiang"};
            [array addObject:dic];
        }
    }
    NSInteger education = [model.auth_info[@"education"] integerValue];
    if (education == 1) {
        NSDictionary *dic = @{@"name":@"学历已认证", @"icon":@"renzheng-xueli"};
        [array addObject:dic];
    }
    NSInteger work = [model.auth_info[@"work"] integerValue];
    if (work == 1) {
        NSDictionary *dic = @{@"name":@"职业已认证", @"icon":@"renzhneg-zhiye"};
        [array addObject:dic];
    }
    
    for (NSInteger i = 0; i < 4; i++) {
        UIButton *cerBtn = (UIButton *)[self viewWithTag:1000+i];
        if (i+ 1 > array.count) {
            cerBtn.hidden = YES;
        } else {
            cerBtn.hidden = NO;
            NSDictionary *dic = array[i];
            [cerBtn setTitle:dic[@"name"] forState:UIControlStateNormal];
            cerBtn.titleLabel.font = Font(Font_10);
            [cerBtn setImage:[UIImage imageNamed:dic[@"icon"]] forState:UIControlStateNormal];
            cerBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -3, 0, 0);
        }
    }
    */
}

@end




/*
#import "WorkerCollectionViewCell.h"

#define WorkerCellLblTag (200)

@interface WorkerCollectionViewCell ()
{
    //    WorkerBaseView *baseView;
    //    UIView *lineView;
    
    UIImageView *headerImgView;
    UILabel *nameLbl;
    UILabel *baseInfoLbl;
    UILabel *workInfoLbl;
    UILabel *intentionLbl;
    UILabel *timeLbl;
    
    UIImageView *tagImgView;
}
@end

@implementation WorkerCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
    self.backgroundColor = COLOR_OF_CLEAR;
    self.contentView.backgroundColor = COLOR_OF_CLEAR;
    
//    baseView = [[WorkerBaseView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 95*Scale)];
//    [self.contentView addSubview:baseView];
    
//    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), self.frame.size.height) backgroundColor:COLOR_OF_WHITE];
    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), ScalePS(90)) backgroundColor:COLOR_OF_WHITE];
    [self.contentView addSubview:self.bgView];
//    [self.bgView corners:(UIRectCornerTopLeft | UIRectCornerTopRight) radii:CGSizeMake(ScalePS(8), ScalePS(8))];
    
    self.bgView.layer.cornerRadius = ScalePS(12);
    self.bgView.layer.masksToBounds = YES;
    self.bgView.layer.borderWidth = 1;
    self.bgView.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    
    headerImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(ScalePS(10), 10*Scale, 44*Scale, 44*Scale) imageName:@"header_bg"];
    headerImgView.contentMode = UIViewContentModeScaleAspectFit;
    headerImgView.layer.cornerRadius = 22*Scale;
    headerImgView.layer.masksToBounds = YES;
    [self.bgView addSubview:headerImgView];
    headerImgView.backgroundColor = THEMECOLOR_OF_TEXT_cccccc;
    
    tagImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(EndX(headerImgView)-15*Scale, EndY(headerImgView)-10*Scale, 10*Scale, 10*Scale) imageName:@"worker_tag"];
    [self.bgView addSubview:tagImgView];
    
//    nameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, 10*Scale, 100, 25*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_18];
    nameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, 10*Scale, 100, 25*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    nameLbl.font = FontBold(Font_18);
    [self.bgView addSubview:nameLbl];
    
//    baseInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(nameLbl), 15*Scale, 200, 15*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_12];
    baseInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(nameLbl), 15*Scale, 200, 15*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_12];
    [self.bgView addSubview:baseInfoLbl];
    
//    workInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(nameLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_14];
    workInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(nameLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_14];
    [self.bgView addSubview:workInfoLbl];
    
//    intentionLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(workInfoLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_14];
    intentionLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(nameLbl), EndY(workInfoLbl), WIDTH-100*Scale, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_14];
    [self.bgView addSubview:intentionLbl];
    
    timeLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, 0, WIDTH-15*Scale, 55*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_12];
    timeLbl.backgroundColor = COLOR_OF_CLEAR;
    timeLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:timeLbl];
    timeLbl.hidden = YES;
    
    
    CGFloat width = (WIDTH - ScalePS(50))*0.25;
    for (NSInteger i = 0; i < 4; i++) {
        UIButton *cerBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        cerBtn.tag = 1000+i;
        cerBtn.frame = CGRectMake(ScalePS(5)+(width+ScalePS(5))*i, EndY(headerImgView)+ScalePS(35), width, ScalePS(20));
        [self.bgView addSubview:cerBtn];
        cerBtn.hidden = YES;
        cerBtn.titleLabel.font = Font(Font_10);
        [cerBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
        cerBtn.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.2];
        cerBtn.layer.cornerRadius = ScalePS(10);
        cerBtn.layer.masksToBounds = YES;
    }
}
- (void)reloadDataModel:(WorkerModel *)model indexPath:(nonnull NSIndexPath *)indexPath {
//    self.bgView.frame = CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), self.frame.size.height);
                   
//    switch (indexPath.row%5) {
//        case 0: {
//            self.bgView.backgroundColor = RGB(255, 118, 108);
//        } break;
//        case 1: {
//            self.bgView.backgroundColor = RGB(187, 104, 252);
//        } break;
//        case 2: {
//            self.bgView.backgroundColor = RGB(255, 137, 67);
//        } break;
//        case 3: {
//            self.bgView.backgroundColor = RGB(2, 168, 252);
//        } break;
//        case 4: {
//            self.bgView.backgroundColor = RGB(254, 187, 57);
//        } break;
//        default:
//            break;
//    }
    
    
    if (model.avatar && model.avatar.length) {
        [headerImgView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:@"header_bg"]];
    } else {
        headerImgView.image = [UIImage imageNamed:@"header_bg"];
    }
    
    NSInteger avatarInt = [model.auth_medal integerValue];
    if (avatarInt) {
        tagImgView.hidden = NO;
    } else {
        tagImgView.hidden = YES;
    }
    
    CGFloat nameWidth = [UIToolsControl textWidth:model.name size:CGSizeMake(MAXFLOAT, 25*Scale) font:Font_18]+10*Scale;
    nameLbl.frame = CGRectMake(EndX(headerImgView)+10*Scale, 10*Scale, nameWidth, 25*Scale);
    nameLbl.text = model.name?model.name:@"";
    
    baseInfoLbl.frame = CGRectMake(EndX(nameLbl), 17*Scale, 200, 15*Scale);
    baseInfoLbl.text = [NSString stringWithFormat:@"%@  %@  %@  %@", model.sex_cn?model.sex_cn:@"", model.age?model.age:@"", model.education_cn?model.education_cn:@"", model.experience_cn?model.experience_cn:@""];
    
    workInfoLbl.text = [NSString stringWithFormat:@"期望薪资：%@",  model.wage_cn?model.wage_cn:@""];
    
    if (model.job_title && model.job_title.length) {
        NSString *ssstr = model.job_title;
        
        NSString *intention1 = [NSString stringWithFormat:@"应聘职位：%@", ssstr];
        NSString *intention2 = @"应聘职位：";
        NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
//        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention1.length)];
//        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention2.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention1.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention2.length)];
        intentionLbl.attributedText = intentionAtt;
    }else if (model.intention_jobs && model.intention_jobs.length) {
        NSString *ssstr = model.intention_jobs;
        
        NSString *intention1 = [NSString stringWithFormat:@"意向职位：%@", ssstr];
        NSString *intention2 = @"意向职位：";
        NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
//        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention1.length)];
//        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention2.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention1.length)];
        [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention2.length)];
        intentionLbl.attributedText = intentionAtt;
    } else {
        if (model.intention_jobsArray && model.intention_jobsArray.count) {
            NSString *ssstr = @"";
            for (NSString *tempStr in model.intention_jobsArray) {
                ssstr = [NSString stringWithFormat:@"%@ %@", tempStr,  ssstr];
            }
            
            NSString *intention1 = [NSString stringWithFormat:@"意向职位：%@", ssstr];
            NSString *intention2 = @"意向职位：";
            NSMutableAttributedString *intentionAtt = [[NSMutableAttributedString alloc] initWithString:intention1];
//            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention1.length)];
//            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:COLOR_OF_WHITE} range:NSMakeRange(0, intention2.length)];
            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_15), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention1.length)];
            [intentionAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_333333} range:NSMakeRange(0, intention2.length)];
            intentionLbl.attributedText = intentionAtt;
        } else {
            intentionLbl.text = @"意向职位：";
        }
    }
    
    
    switch (model.type) {
        case WorkerCellTypeOfNoTime: {
            timeLbl.text = @"";
        } break;
        case WorkerCellTypeOfOnlyTime: {
            timeLbl.text = model.showTime;
        } break;
        case WorkerCellTypeOfCollect: {
            timeLbl.text = [NSString stringWithFormat:@"%@收藏", model.showTime];
        } break;
        case WorkerCellTypeOfLook: {
            timeLbl.text = [NSString stringWithFormat:@"%@", model.showTime];
        } break;
        default:
            break;
    }
    
    
 
    return;
    NSMutableArray *array = [NSMutableArray array];
    NSInteger realname = [model.auth_info[@"realname"] integerValue];
    if (realname == 1) {
        NSDictionary *dic = @{@"name":@"实名已认证", @"icon":@"renzehng-shiming"};
        [array addObject:dic];
    }
    NSInteger avatar = [model.auth_info[@"avatar"] integerValue];
    if (avatar == 1) {
        if ([model.sex isEqualToString:@"2"]) {
            NSDictionary *dic = @{@"name":@"头像已认证", @"icon":@"renzheng_touxiang_nv"};
            [array addObject:dic];
        } else {
            NSDictionary *dic = @{@"name":@"头像已认证", @"icon":@"renzheng-touxiang"};
            [array addObject:dic];
        }
    }
    NSInteger education = [model.auth_info[@"education"] integerValue];
    if (education == 1) {
        NSDictionary *dic = @{@"name":@"学历已认证", @"icon":@"renzheng-xueli"};
        [array addObject:dic];
    }
    NSInteger work = [model.auth_info[@"work"] integerValue];
    if (work == 1) {
        NSDictionary *dic = @{@"name":@"职业已认证", @"icon":@"renzhneg-zhiye"};
        [array addObject:dic];
    }
    
    for (NSInteger i = 0; i < 4; i++) {
        UIButton *cerBtn = (UIButton *)[self viewWithTag:1000+i];
        if (i+ 1 > array.count) {
            cerBtn.hidden = YES;
        } else {
            cerBtn.hidden = NO;
            NSDictionary *dic = array[i];
            [cerBtn setTitle:dic[@"name"] forState:UIControlStateNormal];
            cerBtn.titleLabel.font = Font(Font_10);
            [cerBtn setImage:[UIImage imageNamed:dic[@"icon"]] forState:UIControlStateNormal];
            cerBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -3, 0, 0);
        }
    }
}

@end
*/
